package com.wb.service;

import com.wb.entity.JpaTestBean;
import com.wb.repository.JpaTestDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName : JpaTestServer
 * @Author : 神经刀
 * @Date : 2019/6/11 : 16:51
 * @Version : 1.0
 */
@Service(value="jpaTestServer")
public class JpaTestServer implements IJpaTestService {

    @Resource(name="jpaTestDao")
    private JpaTestDao jpaTestDao;

    @Override
    public List<JpaTestBean> findAll() {
        return jpaTestDao.findAll();
    }

    @Override
    public JpaTestBean saveJpaTestBean(JpaTestBean jpaTestBean) {
        return jpaTestDao.save(jpaTestBean);
    }
}
